/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author TANGQUOCTUAN
 */
@Embeddable
public class BookRoomDetailsPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "BookRoomID", nullable = false)
    private int bookRoomID;
    @Basic(optional = false)
    @Column(name = "RoomID", nullable = false)
    private int roomID;

    public BookRoomDetailsPK() {
    }

    public BookRoomDetailsPK(int bookRoomID, int roomID) {
        this.bookRoomID = bookRoomID;
        this.roomID = roomID;
    }

    public int getBookRoomID() {
        return bookRoomID;
    }

    public void setBookRoomID(int bookRoomID) {
        this.bookRoomID = bookRoomID;
    }

    public int getRoomID() {
        return roomID;
    }

    public void setRoomID(int roomID) {
        this.roomID = roomID;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) bookRoomID;
        hash += (int) roomID;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BookRoomDetailsPK)) {
            return false;
        }
        BookRoomDetailsPK other = (BookRoomDetailsPK) object;
        if (this.bookRoomID != other.bookRoomID) {
            return false;
        }
        if (this.roomID != other.roomID) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entities.BookRoomDetailsPK[bookRoomID=" + bookRoomID + ", roomID=" + roomID + "]";
    }

}
